home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: TMapping again!
- Date: 20 Feb 1996 09:57:47 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4gc5ur$brr@maureen.teleport.com>
- References: <38232371@kone.fipnet.fi> <4fntd3$g56@sunsystem5.informatik.tu-muenchen.de> <38232442@kone.fipnet.fi> <4fvnjb$gdm@oreig.uji.es> <4g147q$sit@maureen.teleport.com> <4ga6lr$rp8@brachio.zrz.TU-Berlin.DE>
- NNTP-Posting-Host: julie.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Philipp Boerker (rawneiha@hydra.zrz.TU-Berlin.DE) wrote:
- : sschaem@teleport.com (Stephan Schaem) writes:
-
- : > I would unroll the innerloop, you probably can save hundreds of dbra
-
- : If you have an object with let's say 5000 polys umrolling will mean
- : a big overhead because of the treatment of "pixels modulo unrolling".
- : You may never enter that unrolled loop!
-
- What do you mean by "pixel modulo unrolling"? Never enter the loop?!?!
- then you dont draw any pixels so its VERY fast :)
-
- Its true that there is some overhead, But here is an example:
-
- ...
- moveq #%1111,d3 ;2
- and.w d2,d3 ;2
- neg.w d3 ;2
- lsr.w #4,d2 ;4
- jmp (.z,pc,d3.w*8) ;10 = 20 per scanline
- .. REPEAT 16
- move.b (a0,d0.w),(a1)
- addx.l d1,d0
- adda.l a2,a1
- ENDR
- .z dbra d2,.. ;6 per pixel
- ...
-
- now if this 'polygon' is more then 4 pixel height its worth it... well,
- if its a few pixel width too :)
- But yea, I would be carefull if the polygon are realy tiny and the
- routine is out of the cache for each new polygon rendered.
-
- If the poly where to be ~4x4 pixel I would think rendering then using
- the average color of the texture (precalculated of course) and use a
- flat shading function (using also the average of the light value at the
- triangle vertices, I dont think its worth gouraud shading stuff that
- tiny).
-
- Stephan
-